/* Name: 	Rio Atmadja
   Program:	stack_array.h
*/

#ifndef STACKARRAY_H
#define STACKARRAY_H
#include <iostream>
using namespace std;

template <class Type>
class stack_array {

	private:
		int size; //variable that keeps track the size of the stack
		int current; //variable to keeps track the length of the stack
		int position; //variable that keeps track position of the list
		Type *list; //pointer to the array that holds the stack elements

	public:
		
		stack_array(); //default constractor
		~stack_array(); //default destractor 
		void push(Type); //pushing element into the stack
		Type top(); //return the top element of the stack
		Type getIndex(int);//get element at index
		void pop(); //decrement the size of the stack
		bool isEmpty() const; //check if the stack is empty
		bool isFull(); //check if the stack if full
		int length(); //return the length of the stack
		void print(); //print the stack element to the console
		void shuffle(); //shuffle the elements
		void print_to_file(); //print to the file
		bool read_file(); //read from the file
};
#include "stack_array.cpp.h"
#endif



